<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	<ui:composition template="/views/layouts/main.xhtml">
	<ui:define name="content">
		<h:form id="formPrincipal">
			<div class="grid_18">
				<div class="grid_6">
					<util:home action="#{cenarioBaseBean.goHome}" />
					<p:commandButton value="#{i18n.btn_Novo}" action="#{cenarioBaseBean.goCreate}" 
						immediate="true" ajax="false" icon="ui-icon ui-icon-plus" />
				</div>
				<util:titulo value="#{i18n.TituloCenarioBase}" />
				<div class="grid_1">
					<util:help />
				</div>
			</div>
			
			<div class="grid_18">
				<p:messages />
			</div>
			
			<div class="grid_18">
				<p:dataTable id="dataTableCenarioBase" widgetVar="dataTableCenarioBase"
					paginator="true" rows="#{contextoBean.dataTableRows}" dynamic="true" 
					value="#{cenarioBaseBean.cenarioBaseList}" 
					var="var" currentPageReportTemplate="#{contextoBean.paginatorTemplate}"
					rowsPerPageTemplate="#{contextoBean.rowsPerPage}"
					paginatorPosition="#{contextoBean.paginatorPosition}"
					emptyMessage="#{i18n.NenhumClientePortalEncontrado}">
					<f:facet name="header">
						<div class="grid_3" style="padding-top: 8px;">
							#{i18n.CenarioBase_Grid_Header}
						</div>
						<div class="grid_7" style="text-align: right; float: right;">
							<p:commandButton type="button" onclick="dialogoFiltrarCenario.show()" 
								value="#{i18n.btn_Filtrar}" icon="ui-icon ui-icon-search" />
							<p:commandButton action="#{cenarioBaseBean.goDelete}" 
								onstart="spinner.show();" oncomplete="spinner.hide(); dialogoExcluir.show()" 
								value="#{i18n.btn_Excluir}" icon="ui-icon ui-icon-trash" />
						</div>
					</f:facet>
					<p:column headerText="#{i18n.CenarioBase_Grid_Nome}">  
			            <h:outputText value="#{var.nome}" />  
			        </p:column>
				</p:dataTable>
			</div>
		</h:form>
		
		<ui:include src="/views/cenarioBase/_filtrar.xhtml" />
	</ui:define>
	</ui:composition>
</f:view>